cmake_minimum_required(VERSION 3.20)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Quick Gui Qml)

set(SOURCES
    main.cpp
    Counter.cpp
    Counter.h
)

set(QML_FILES
    qml/CounterExample/main.qml
)

qt_add_executable(forQuick
    ${SOURCES}
)

qt_add_qml_module(forQuick
    URI forQuick
    VERSION 1.0
    QML_FILES ${QML_FILES}
)

target_link_libraries(forQuick
    PRIVATE
    Qt${QT_VERSION_MAJOR}::Quick
    Qt${QT_VERSION_MAJOR}::Qml
    fluentuiplugin
)